import { post, get } from '@/utils/axios'

const prefixUrl = '/work/student/'

/** 保存学生 */
export const saveStudent = (form) => {
  // 不以form方式提交
  return post(`${prefixUrl}saveStudent`, form, false)
}

/** 学生列表 */
export const studentList = () => {
  return get(`${prefixUrl}list`)
}

/** 删除学生 */
export const deleteStudent = async (id) => {
  return post(`${prefixUrl}delete`, { id })
}

/** 根据id 查询学生 */
export const findStudentById = (id) => {
  return get(`${prefixUrl}findById`, { id })
}
